/**
* @program: src
*
* @description:
*
* @author: Mr.chen
*
* @create: 2022-04-02 15:54
**/
package handler

import (
	"do_demo/srv/app/logic/api/internal/logic"
	"do_demo/srv/app/logic/api/internal/types"
	"do_demo/srv/common/response"
	//"fmt"
	"github.com/gin-gonic/gin"
)

func (s *Server) TestSrv(c *gin.Context) {
	var req types.Arg
	if err := c.BindQuery(&req); err != nil {
		errors(c, RequestErr, err.Error())
		return
	}
	//fmt.Println(c.Request.Context())
	// read message
	//msg, err := ioutil.ReadAll(c.Request.Body)
	//if err != nil {
	//	errors(c, RequestErr, err.Error())
	//	return
	//}
	l := logic.NewTestSrvLogic(c.Request.Context(),s.logic.SvcCtx)
	resp,err := l.TestSrv(c,req);
	response.HttpResult(c,resp,err)
}